using System;
using System.Diagnostics;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
using Microsoft.SharePoint.Navigation;
using Microsoft.SharePoint.Administration;

namespace SPSourceSample {
  public class FeatureReceiver : SPFeatureReceiver {

    public override void FeatureActivated(SPFeatureReceiverProperties properties) {
        /* no op */
    }

    public override void FeatureDeactivating(SPFeatureReceiverProperties properties) {
        if (properties.Feature.Parent is SPSite)
        {
            SPSite site = properties.Feature.Parent as SPSite;
            SPWeb web = site.OpenWeb();
            web.Lists["CustomList"].Delete();
        }
    }

    public override void FeatureInstalled(SPFeatureReceiverProperties properties) {
        /* no op */
    }
    public override void FeatureUninstalling(SPFeatureReceiverProperties properties) {
        /* no op */
    }
  }
}
